home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_30088.txt < prev    next >
Text File  |  1991-02-27  |  2KB  |  83 lines

  1. -- card: 30088 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0007
  11. -- rect: left=30 top=78 right=296 bottom=478
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 4
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 2 (button)
  23. -- low flags: 00
  24. -- high flags: 0001
  25. -- rect: left=13 top=29 right=57 bottom=351
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: New Button
  34.  
  35.  
  36. -- part contents for card part 1
  37. ----- text -----
  38. /*
  39. *   FILE:    function.test.c
  40. *   AUTHOR:  R.G.
  41. *   CREATED: June 22, 1990
  42. *   
  43. *   Program illustrating various function features.
  44. *
  45. *   PROJECT CONTENTS:
  46. *   function.test.c, contains.char.c, ANSI, oops libraries
  47. */
  48.  
  49. # include <stdio.h>   /* declare standard I/O functions */
  50.  
  51. int  contains_char(char*,char);  /* declare function in other file */
  52.  
  53. /******************************************************************
  54. *   main() function
  55. ******************************************************************/
  56. main()
  57. {
  58.     char  name[80],
  59.           search_char,
  60.           junk;
  61.  
  62.     printf("Enter your name (no spaces):\n");
  63.     scanf("%s",name);
  64.     scanf("%c",&junk);     /* get unneeded linefeed character */
  65.     printf("Enter search character:\n");
  66.     scanf("%c",&search_char);
  67.  
  68.     printf("Result: %d\n",contains_char(name,search_char));
  69. }
  70.  
  71.  
  72.  
  73. -- part contents for background part 4
  74. ----- text -----
  75. File 1 of 2 demonstrating C functions:
  76.  
  77. -- part contents for background part 6
  78. ----- text -----
  79. Example of recursion, multiple source files
  80.  
  81. -- part contents for background part 7
  82. ----- text -----
  83. 103